home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / OSAGeneric.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  4.0 KB  |  122 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        OSAGeneric.h
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OSAGENERIC__
  21. #define __OSAGENERIC__
  22.  
  23.  
  24. #ifndef __ERRORS__
  25. #include <Errors.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __APPLEEVENTS__
  30. #include <AppleEvents.h>
  31. #endif
  32. /*    #include <Types.h>                                            */
  33. /*    #include <Memory.h>                                            */
  34. /*        #include <MixedMode.h>                                    */
  35. /*    #include <OSUtils.h>                                        */
  36. /*    #include <Events.h>                                            */
  37. /*        #include <Quickdraw.h>                                    */
  38. /*            #include <QuickdrawText.h>                            */
  39. /*    #include <EPPC.h>                                            */
  40. /*        #include <AppleTalk.h>                                    */
  41. /*        #include <Files.h>                                        */
  42. /*        #include <PPCToolbox.h>                                    */
  43. /*        #include <Processes.h>                                    */
  44. /*    #include <Notification.h>                                    */
  45.  
  46. #ifndef __OSA__
  47. #include <OSA.h>
  48. #endif
  49. /*    #include <AEObjects.h>                                        */
  50. /*    #include <Components.h>                                        */
  51.  
  52. #ifdef __cplusplus
  53. extern "C" {
  54. #endif
  55.  
  56. #if PRAGMA_ALIGN_SUPPORTED
  57. #pragma options align=mac68k
  58. #endif
  59.  
  60. #if PRAGMA_IMPORT_SUPPORTED
  61. #pragma import on
  62. #endif
  63.  
  64. /*     NOTE:    This interface defines a "generic scripting component."
  65.             The Generic Scripting Component allows automatic dispatch to a
  66.             specific scripting component that conforms to the OSA interface.
  67.             This component supports OSA, by calling AppleScript or some other 
  68.             scripting component.  Additionally it provides access to the default
  69.             and the user-prefered scripting component.
  70. */
  71.  
  72. enum {
  73. /* Component version this header file describes */
  74.     kGenericComponentVersion    = 0x0100
  75. };
  76.  
  77. enum {
  78.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  79.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  80.     kGSSSelectGetScriptingComponent = 0x1003,
  81.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  82.     kGSSSelectGenericToRealID    = 0x1005,
  83.     kGSSSelectRealToGenericID    = 0x1006,
  84.     kGSSSelectOutOfRange        = 0x1007
  85. };
  86.  
  87. typedef OSType ScriptingComponentSelector;
  88.  
  89. typedef OSAID GenericID;
  90.  
  91. /* get and set the default scripting component */
  92. extern pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  93.  FIVEWORDINLINE(0x2F3C, 4, 0x1001, 0x7000, 0xA82A);
  94. extern pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  95.  FIVEWORDINLINE(0x2F3C, 4, 0x1002, 0x7000, 0xA82A);
  96. /* get a scripting component instance from its subtype code */
  97. extern pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  98.  FIVEWORDINLINE(0x2F3C, 8, 0x1003, 0x7000, 0xA82A);
  99. /* get a scripting component selector (subType) from a stored script */
  100. extern pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  101.  FIVEWORDINLINE(0x2F3C, 8, 0x1004, 0x7000, 0xA82A);
  102. /* get a real component instance and script id from a generic id */
  103. extern pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  104.  FIVEWORDINLINE(0x2F3C, 8, 0x1005, 0x7000, 0xA82A);
  105. /* get a generic id from a real component instance and script id */
  106. extern pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  107.  FIVEWORDINLINE(0x2F3C, 8, 0x1006, 0x7000, 0xA82A);
  108.  
  109. #if PRAGMA_IMPORT_SUPPORTED
  110. #pragma import off
  111. #endif
  112.  
  113. #if PRAGMA_ALIGN_SUPPORTED
  114. #pragma options align=reset
  115. #endif
  116.  
  117. #ifdef __cplusplus
  118. }
  119. #endif
  120.  
  121. #endif /* __OSAGENERIC__ */
  122.